﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace QYmall.Core.Model.ViewModels
{
    /// <summary>
    /// 商品规格(显示)
    /// </summary>
    public class ShopGoodsSkuDto
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        public long Id { get; set; }

        /// <summary>
        /// 父规格ID
        /// </summary>
        [Display(Name = "父规格")]
        public long ParentId { get; set; } = 0;

        /// <summary>
        /// 所属商品ID
        /// </summary>
        [Display(Name = "所属商品")]
        public long GoodsId { get; set; }

        /// <summary>
        /// 所属规格ID
        /// </summary>
        [Display(Name = "所属规格")]
        public long SkuId { get; set; }

        /// <summary>
        /// 规格标题
        /// </summary>
        [Display(Name = "规格标题")]
        [Required(ErrorMessage = "{0}不可为空")]
        [StringLength(128)]
        public string? Title { get; set; }

        /// <summary>
        /// 规格图片
        /// </summary>
        [Display(Name = "规格图片")]
        [StringLength(512)]
        public string? ImgUrl { get; set; }
    }
}
